import java.awt.*;

public class Pieces
{
	
public int firstCorner;
public int secondCorner;
public int thirdCorner;
public int fourthCorner;	
	Graphics h;
	int x;
	int y;
	String a;
	public Pieces(int x,int y,String b)
	{
		x=x;
		y=y;
	    a=b;
	  
	  
	 
		
		
	}
	
	
public void drawPiece(Graphics g)
{
	
 if(a.equalsIgnoreCase("t"))
	  {
	  drawT(g);	
	 	
	  }
	 else if(a.equalsIgnoreCase("L"))
	  {
	  	drawL(g);
	  	
	  }
	  else if(a.equalsIgnoreCase("i"))
	  {
	  	drawI(g);
	  	
	  }
	  else if(a.equalsIgnoreCase("j"))
	  {
	  	drawJ(g);
	  	
	  }
	  else if(a.equalsIgnoreCase("o"))
	  {
	  	drawO(g);
	  	
	  }
	  else if(a.equalsIgnoreCase("s"))
	  {
	  	drawS(g);
	  	
	  }
	  else if(a.equalsIgnoreCase("z"))
	  {
	  	drawZ(g);
	  	
	  }	
	
	
	
}
	
	
public void drawT(Graphics G)
{
	
	
		G.drawRect(x,y,50,50);
        G.drawRect(x+50,y,50,50); 
        G.drawRect(x+100,y,50,50); 
        G.drawRect(x+50,y+50,50,50);	
        
        firstCorner = x;
        secondCorner = x+150;
        thirdCorner = y+50;
        
        
        
	
}

public void drawL(Graphics g)
{
	
	    g.drawRect(x,y,50,50);
  		g.drawRect(x,y+50,50,50);
  		g.drawRect(x,y+100,50,50);
  		g.drawRect(x+50,y+100,50,50);
  		
  		firstCorner = x;
        secondCorner = x+100;
        thirdCorner = y+100;
        //fourthCorner = y+50;
	   
	
}	
	
public void drawI(Graphics g)
{
	
	    g.drawRect(x,y,50,50);
  		g.drawRect(x,y+50,50,50);
  		g.drawRect(x,y+100,50,50);
  		g.drawRect(x,y+150,50,50);
  	
  	
  	    firstCorner = x;
        secondCorner =x+50;
        thirdCorner = y+150;
        //fourthCorner = y+150;
	
}	

public void drawJ(Graphics g)
{
	
	    g.drawRect(x+50,y,50,50);
  		g.drawRect(x+50,y+50,50,50);
  		g.drawRect(x+50,y+100,50,50);
  		g.drawRect(x,y+100,50,50);
  		
  		
  		firstCorner = x;
        secondCorner = x+100;
        thirdCorner = y+100;
        //fourthCorner = y+100;
	
}
	
public void drawO(Graphics g)
{
	g.drawRect(x,y,50,50);
	g.drawRect(x+50,y,50,50);
	g.drawRect(x,y+50,50,50);
	g.drawRect(x+50,y+50,50,50);
	
	    firstCorner = x;
        secondCorner = x+100;
        thirdCorner = y+50;
        //fourthCorner = y+50;
	
	
	
}	

public void drawS(Graphics g)
{    
	g.drawRect(x+100,y,50,50);
	g.drawRect(x+50,y,50,50);
	g.drawRect(x+50,y+50,50,50);
	g.drawRect(x,y+50,50,50);
	
		firstCorner = x+150;
        secondCorner = x;
        thirdCorner = y+50;
        //fourthCorner = y+50;
	
}

public void drawZ(Graphics g)
{    
	
	g.drawRect(x,y,50,50);
	g.drawRect(x+50,y,50,50);
	g.drawRect(x+50,y+50,50,50);
	g.drawRect(x+100,y+50,50,50);
	
		firstCorner = x;
        secondCorner = x+150;
        thirdCorner = y+50;
       // fourthCorner = y+50;
	
	
}

public int getfirstCorner()
{
	
return  firstCorner;	
	
}	
public int getsecondCorner()
{
	
return  secondCorner;	
	
}

public int getthirdCorner()
{
	
return  thirdCorner;	
	
}

public int getfourthCorner()
{
	
return  fourthCorner;	
	
}

public void setfirstCorner(int a,int g,int h)
{
	x=g;
	y=h;
	
  firstCorner = a;	
	
}	
public void setsecondCorner(int a)
{
	
	
 secondCorner = a;	
	
}

public void  setthirdCorner(int a)
{
	
	
 thirdCorner = a;	
	
}

public void setfourthCorner(int a)
{
	
	
  fourthCorner = a;	
	
}


	
}
